const mongoose = require('mongoose')
const {Schema,model} = mongoose 
const userSchema = new Schema({
  __v: {type: Number,select:false},
  avatar_url: { type: String, default: 'https://www.hualigs.cn/image/60364a03036ce.jpg'},
  username : {type: String, required: true},
  realname : {type: String, required: false},
  password : {type: String, required: true},
  age: { type: Number, required: false},
  sex : {type: String,enum:['male','female'],default:'male',required: false},
  address: { type: String, required: false ,default: '河北省,保定市'},
  birthday: { type: Date, required: false, default: '2021-03-17' }
},{timestamps:true})

module.exports = model("User",userSchema)